import React from 'react';

import LogoImg from '../assets/image/logo.png'
import CostStatisticsImg from '../assets/image/cb.png'
import OutSlaughterAddImg from '../assets/image/cl.png'
import DiseaseAddImg from '../assets/image/jb.png'
import EntryAddImg from '../assets/image/rl.png'
import InColunSearchImg from '../assets/image/zl.png'


require('../assets/css/home.css')


//home.js
export default class Home extends React.Component {
    //入栏添加
    toEntryAdd  = (props) =>{
        this.props.history.push({
            pathname:'/EntryAddList'
        })
        // React.PushPage('EntryAdd');
    }
    //出栏添加
    OutSlaughterAdd = (props) =>{
        this.props.history.push({
            pathname:'/OutSlaughterAdd'
        })
    }
    //疾病添加
    DiseaseAdd = (props) =>{
        this.props.history.push({
            pathname:'/DiseaseAdd/' + props
        })
    }
    //在栏查询
    InColunSearch = (props) =>{
        this.props.history.push({
            pathname:'/ColumnSearch'
        })
    }
    //成本统计
    CostStatistics = (props) =>{
        this.props.history.push({
            pathname:'/CostStatistics'
        })
    }

    render() {
        return (
                <div className={'main'}>
                    <div className={'sectionOne'}>
                        <div className={'bg1'}></div>
                        <div className={'leftItem'}>

                        </div>
                        <div className={'rightItem'}>
                            <img className={'logoImg'} src={LogoImg} alt=""/>
                        </div>
                    </div>
                    <div className={'sectionTwo'}>
                        <div className={'bg2'}></div>
                        <div className={'leftItem'}>
                            <div className={'imgBox'}>
                                <img onClick={this.toEntryAdd} className={'img'} src={EntryAddImg} alt=""/>
                                <img onClick={this.OutSlaughterAdd} className={'img'} src={OutSlaughterAddImg} alt=""/>
                                <img onClick={() => this.DiseaseAdd(null)} className={'img'} src={DiseaseAddImg} alt=""/>
                            </div>
                        </div>
                        <div className={'rightItem'}></div>
                    </div>
                    <div className={'sectionThree'}>
                        <div className={'bg3'}></div>
                        <div className={'leftItem'}></div>
                        <div className={'rightItem'}>
                            <div className={'ImgBox'}>
                                <img onClick={this.InColunSearch} className={'img'} src={InColunSearchImg} alt=""/>
                                <img onClick={this.CostStatistics} className={'img'} src={CostStatisticsImg} alt=""/>
                            </div>
                        </div>
                    </div>
                </div>
        )
    }
}


// eslint-disable-next-line no-unused-vars
const styleObj = {
    details: {
        fontSize: '20px'
    }
};
